@import '../style/theme/color';
@import '../style/theme/corner';
@import '../style/core/_font';
@import '../style/core/z-index';
@import '../style/core/animation';
@import '../style/theme/shadow';

.user-guide-mask-layer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: calc(#{$devui-z-index-full-page-overlay} - 1);
  inset: 0;
  background: #252b3a;
  opacity: 0.28;
  display: none;
}

.show-overlay {
  display: block !important;
}

.user-guide-normal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: calc(#{$devui-z-index-full-page-overlay} - 1);
  inset: 0;
  display: none;
}

.user-guide-top-overlay {
  top: 0;
  left: 0;
  position: absolute;
  width: 100%;
  z-index: $devui-z-index-full-page-overlay;
  background: rgba(#252b3a, 0.3);
  display: none;
  transition: all 0.3s ease-out;
}

.user-guide-bottom-overlay {
  left: 0;
  position: absolute;
  width: 100%;
  z-index: $devui-z-index-full-page-overlay;
  background: rgba(#252b3a, 0.3);
  display: none;
  transition: all 0.3s ease-out;
}

.user-guide-left-overlay {
  left: 0;
  position: absolute;
  z-index: $devui-z-index-full-page-overlay;
  background: rgba(#252b3a, 0.3);
  display: none;
  transition: all 0.3s ease-out;

  &::after,
  &::before {
    content: '';
    display: block;
    height: 4px;
    width: 4px;
    position: absolute;
    bottom: 0;
    background: radial-gradient(4px at 4px 0, transparent 4px, rgba(#252b3a, 0.3) 4px);
  }

  &::after {
    // top: -8px;
    transform: rotate(0deg);
    right: 0;
    margin-right: -4px;
  }

  &::before {
    transform: rotate(90deg);
    right: 0;
    top: 0;
    margin-right: -4px;
  }
}

.user-guide-right-overlay {
  position: absolute;
  z-index: $devui-z-index-full-page-overlay;
  background: rgba(#252b3a, 0.3);
  display: none;
  transition: all 0.3s ease-out;

  &::after,
  &::before {
    content: '';
    display: block;
    height: 4px;
    width: 4px;
    position: absolute;
    bottom: 0;
    background: radial-gradient(4px at 4px 0, transparent 4px, rgba(#252b3a, 0.3) 4px);
  }

  &::after {
    top: -4px;
    transform: rotate(180deg);
    margin-left: -4px;
    margin-top: 4px;
  }

  &::before {
    bottom: -4px;
    transform: rotate(270deg);
    margin-left: -4px;
    margin-bottom: 4px;
  }
}

.user-guide-active-shadow {
  position: absolute;
  z-index: calc(#{$devui-z-index-full-page-overlay} + 1);
  pointer-events: none;
  border-radius: $devui-border-radius;
  animation: breath 2s linear;
  animation-iteration-count: infinite;
  display: none;
}

@keyframes breath {
  0% {
    outline: rgba(#ffffff, 1) solid 0;
  }

  100% {
    outline: rgba(#ffffff, 0) solid 10px;
  }
}

.user-guide-dot {
  position: absolute;
  z-index: calc(#{$devui-z-index-full-page-overlay} + 1);
  width: 32px;
  height: 32px;
  animation: 2s ease 0s infinite normal both ops-animation;
  display: none;
}

.user-guide-panel {
  position: absolute;
  z-index: 10001;
  transition: all 0.3s ease-out;
}

.user-guide-panel-multiple {
  min-width: 400px;
  padding: 20px;
  background-color: $devui-connected-overlay-bg;
  transition: all 0.3s ease-out;
  border-radius: $devui-border-radius-card;
  box-shadow: 0 4px 16px 0 rgb(0 0 0 / 28%);

  &-header {
    padding: 8px 32px 0;
  }

  &-body {
    max-width: 400px;
    font-size: $devui-font-size-card-title;

    .finish-icon {
      position: absolute;
      top: 50px;
      right: 8px;
    }
  }

  &-footer {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    d-button {
      margin: 4px;
    }
  }

  &-footer-only-dot {
    margin-top: 16px;
  }
}

.user-guide-panel-single {
  background-color: $devui-connected-overlay-bg;
  padding: 8px 12px;
  transition: all 0.3s ease-out;
  border-radius: $devui-border-radius;
  box-shadow: 0 4px 16px 0 rgb(0 0 0 / 28%);

  button.close {
    margin-left: 12px;
    font-size: $devui-font-size-icon;
    font-weight: bold;
    line-height: 1;
    color: $devui-icon-fill;
    cursor: pointer;
    background: transparent;
    border: 0;
    -webkit-appearance: none;

    svg.svg-icon-close polygon {
      fill: $devui-text-weak;
    }
  }
}

.user-guide-panel-tip {
  background-color: $devui-brand;
  padding: 8px 12px;
  transition: all 0.3s ease-out;
  border-radius: $devui-border-radius;
  box-shadow: 0 4px 16px 0 rgb(0 0 0 / 28%);
  color: $devui-light-text;

  button.close {
    margin-left: 12px;
    font-size: $devui-font-size-icon;
    font-weight: bold;
    line-height: 1;
    color: $devui-light-text;
    cursor: pointer;
    background: transparent;
    border: 0;
    -webkit-appearance: none;

    svg.svg-icon-close polygon {
      fill: $devui-light-text;
    }
  }
}

.user-guide-panel-close {
  position: absolute;
  right: 16px;
  top: 24px;
  font-size: $devui-font-size-icon;
  font-weight: bold;
  line-height: 1;
  color: $devui-icon-fill;
  cursor: pointer;
  background: transparent;
  border: 0;
  -webkit-appearance: none;

  svg.svg-icon-close polygon {
    fill: $devui-text-weak;
  }

  &:hover {
    svg.svg-icon-close polygon {
      fill: $devui-icon-fill-active;
    }
  }
}

.user-guide-panel-title {
  font-size: $devui-font-size-modal-title;
  color: $devui-text;
  font-weight: bold;
  margin-bottom: 20px;
  display: flex;
  align-items: center;

  .user-guide-panel-title-index {
    display: inline-flex;
    margin-right: 8px;
    justify-content: center;
    align-items: center;
    position: relative;
  }
}

.user-guide-panel-title + .user-guide-panel-content {
  margin-left: 32px;
}

.user-guide-panel-content {
  // margin-top: 20px;
  font-size: $devui-font-size;
  color: $devui-text;
}

.devui-carousel-dots {
  display: flex;
  flex-wrap: wrap;

  .dot-item {
    width: 4px;
    height: 4px;
    border-radius: 100%;
    margin-right: 8px;
    margin-bottom: 4px;
    background: $devui-icon-fill-weak;

    &:hover {
      cursor: pointer;
      background: $devui-icon-fill-hover;
    }

    &.active {
      background: $devui-icon-fill-active;
      transition: all 0.5s ease;
    }
  }
}

.devui-user-guide-panel-arrow {
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  display: block;
  z-index: -1;
  background-color: $devui-brand;
  position: relative;
}

.devui-mask-layer {
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  position: 'fixed';
  z-index: calc(#{$devui-z-index-full-page-overlay} - 1);
}

.devui-carousel-wapper {
  display: inline-block;
}

.operate-zone {
  margin-top: 20px;
  padding: 8px 0;
  border: 2px dashed $devui-line;
  text-align: center;
  cursor: pointer;
}

.emphasize-animation {
  animation: 1s ease 0s infinite normal both ops-animation;
}

@keyframes ops-animation {
  0% {
    box-shadow: 0 0 0 $devui-brand;
  }

  60% {
    box-shadow: 0 1px 4px $devui-brand;
  }

  to {
    box-shadow: 0 0 0 $devui-brand;
  }
}
